package com.shxy.controller.ui;

import com.fasterxml.jackson.annotation.JsonValue;
import com.shxy.entity.common.enums.RoleEnum;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 用户数据类
 */
@Data
public class UserBean {
    // 新增
    public interface Add {}
    // 更新
    public interface Update {}

    @NotBlank(message = "编号不能为空", groups = Update.class)
    private String id;
    @NotBlank(message = "账号不能为空", groups = {Add.class, Update.class})
    @Size(min = 3, max = 12, message = "账号长度在3-12个字符", groups = {Add.class, Update.class})
    private String username;
    private String introduction;
    private String avatar;
    private List<RoleEnum> roles;
}
